<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>恋爱时刻</title>
    <link rel="stylesheet" href="CSS/normalize.css">
    <!-- 先引入CSS文件，放到自己文件的上面 -->
    <link rel="stylesheet" href="CSS/swiper.min.css">
    <link rel="stylesheet" href="CSS/index.css">

</head>

<body>
    <!-- 方便添加背景色 -->
    <section class="warp">
        <!-- 引入JS文件 -->
        <script src="JS/flexible.js"></script>
        <!-- 头部区域 -->
        <header class="header">恋爱时刻</header>
        <!-- 导航栏部分 -->
        <nav class="nav">
            <a href="#"><img src="uplode/icon1.png" alt="">
                <span> 恋爱测试</span></a>
            <a href="#"><img src="uplode/icon2.png" alt="">
                <span> 笔上谈情</span></a>
            <a href="#"><img src="uplode/icon3.png" alt="">
                <span>线上对话</span> </a>
            <a href="#"><img src="uplode/icon4.png" alt="">
                <span>恋爱技巧</span> </a>
            <a href="#"><img src="uplode/icon5.png" alt="">
                <span>模拟情侣</span></a>
            <a href="#"><img src="uplode/icon6.png" alt="">
                <span>心仪查询</span> </a>
        </nav>
        <!-- go模块 -->
        <section class="go">
            <img src="images/go.png" alt="">
        </section>
    </section>

    <!-- ————————————————————————————恋爱指导模块—————————————————————————————— -->
    <!-- 我们观察不难发现，恋爱指导模块和充电学习模块上大同小异，可为他们设置公共样式 -->
    <section class="content">
        <!-- 头部 -->
        <div class="content-hd">
            <div class="left"><i class="icon_1"></i>恋爱指导</div>
            <a class="right" href="#">更多>></a>

        </div>
        <!-- 旋转木马 -->
        <!-- 需要用到swiper插件 -->

        <div class="content-bd">
            <!-- Swiper -->
            <div class="swiper-container love_guidance_focus">
                <div class="swiper-wrapper">
                    <div class="swiper-slide">
                        <a href="#"><img src="images/Q1.jpg" alt=""></a>
                        <p>大师教你应对约会技巧</p>
                    </div>
                    <div class="swiper-slide">
                        <a href="#"><img src="images/Q2.jpg" alt=""></a>
                        <p>恋爱圣经</p>
                    </div>
                    <div class="swiper-slide">
                        <a href="#"><img src="images/Q3.jpg" alt=""></a>
                        <p>恋爱经历</p>
                    </div>
                    <div class="swiper-slide">
                        <a href="#"><img src="images/Q4.jpg" alt=""></a>
                        <p>情话大全</p>
                    </div>
                    <div class="swiper-slide">
                        <a href="#"><img src="images/Q5.png" alt=""></a>
                        <p>谈情说爱</p>
                    </div>

                </div>

            </div>
            <!-- 这个左右箭头应该在content-bd里，不在swiper-container里，然后在bd里放上相对定位即可 -->
            <!-- Add Arrows 添加左右箭头-->
            <div class="swiper-button-next"></div>
            <div class="swiper-button-prev"></div>
        </div>
    </section>
    <!-- 此处复制上面的恋爱指导再进行相应修改就可以了 -->
    <!--———————————————————————————— 充电情话学习模块 ———————————————————————————————————————————————————————-->
    <section class="content content_study">
        <!-- 头部 -->
        <div class="content-hd">
            <div class="left"><i class="icon_2"></i>充电情话学习</div>
            <a class="right" href="#">更多>></a>

        </div>
        <!-- 旋转木马 -->
        <!-- 需要用到swiper插件 -->

        <div class="study">
            <!-- Swiper -->
            <div class="swiper-container study_focus">
                <div class="swiper-wrapper">
                    <div class="swiper-slide">
                        <a href="#"><img src="images/pic5.png" alt="">
                            <h5>泡妞全套秘籍点击即享</h5>
                            <p>857人在线</p>
                        </a>

                    </div>
                    <div class="swiper-slide">
                        <a href="#">
                            <img src="images/pic1.png" alt="">
                            <h5>说魅力情话，告别土味情话</h5>
                            <p>158人在线</p>
                        </a>

                    </div>
                    <div class="swiper-slide">
                        <a href="#"><img src="images/pic3.png" alt="">
                            <h5>攻略金字塔思维提升泡妞能力</h5>
                            <p>2001人在线</p>
                        </a>

                    </div>
                    <div class="swiper-slide">
                        <a href="#"><img src="images/pic2.png" alt="">
                            <h5>0基础恋爱经验变身泡妞达人</h5>
                            <p>158人在线</p>
                        </a>

                    </div>
                    <div class="swiper-slide">
                        <a href="#"><img src="images/QQ6.png" alt="">
                            <h5>穿搭上档次，恋爱近一步</h5>
                            <p>555人在线</p>
                        </a>

                    </div>



                </div>

            </div>
    </section>
    <!-- ————————————————————————————底部模块制作—————————————————————————— -->
    <footer class="footer">
        <a href="#">
            <!-- 遇到问题：图片和文字不能居中显示 -->
            <img src="uplode/home.png" alt="">
            <p>首页</p>
        </a>
        <a href="#">
            <img src="uplode/net.png" alt="">
            <p>同城</p>
        </a>
        <a href="#">
            <img src="uplode/ms.png" alt="">
            <p>模拟恋爱</p>
        </a>
        <a href="#">
            <img src="uplode/user.png" alt="">
            <p>我的主页</p>
        </a>
    </footer>


    <!-- ———————————————————————————————js————————————————————————————————————————————————————————————— -->
    <script src="JS/swiper.min.js"></script>
    <!-- Initialize Swiper -->
    <script>
        // 通过各种修改，该删删，该加加就行了嘿嘿

        // 第一个函数（沙箱函数）里面是 恋爱指导轮播图    
        (function() {
            // 由于初始化的代码相同，所以那个左右箭头移动的时候，下面也会受影响，
            // 所以如果有多个轮播图的话，修改下swiper-container
            var swiper = new Swiper('.love_guidance_focus', {
                // 能够显示的slide个数，你写2就说明一个完整的·和左右一个一半
                slidesPerView: 2,
                spaceBetween: 30,
                // 默认是否，否的话1号中间的图会默认在左边显示
                centeredSlides: true,
                loop: true,

                // 添加左右箭头
                navigation: {
                    nextEl: '.swiper-button-next',
                    prevEl: '.swiper-button-prev',
                },
            });
        })();
        // 第二个函数的轮播图
        (function() {
            var swiper = new Swiper('.study_focus', {
                slidesPerView: 2.4,
                spaceBetween: 30,
                pagination: {
                    el: '.swiper-pagination',
                    clickable: true,
                },
            });
        })();
    </script>

</body>

</html>